import { Component } from '@angular/core';

import { NotifyService } from '../../../utils/notify.service';
import { Log } from '../../../utils/log';

@Component({
  selector: 'book',
  templateUrl: './book.component.html',
  styleUrls: ['./book.component.styl'],
  providers: [NotifyService]
})

export class BookComponent {

  constructor(
    private notify: NotifyService
  ) { }

  onSuccessClick() {
    Log.print("d","=4");
    this.notify.success("保存成功!").subscribe();
  }

  onErrorClick() {
    this.notify.error("操作失败!","dddddddddd","哈哈").subscribe(()=>{
      Log.print('确定后调用');
    });
  }

  onConfrimClick() {
    this.notify.confirm("要删除吗？","dddddddddd","ok").subscribe((ret)=>{
      Log.print(ret);
    });
  }
}
